<div id="post-<%= @post.id %>" class="post hentry">
  <div class="hd">
    <h1 class="entry-title">
      <a href="<%== @post.url %>" rel="bookmark" title="Permalink for this post">
        <%== @post.title %>
      </a>
    </h1>

    <address class="vcard author">
      <a class="email fn"
          href="mailto:<%== Thoth::Config.admin['email'] %>"><%== Thoth::Config.admin['name'] %></a>
    </address>

    <span class="date robots-nocontent">
      <abbr class="published" title="<%= @post.created_at.xmlschema %>">
        <%= @post.created_at(Thoth::Config.timestamp['long']) %>
      </abbr>
    </span>
  </div>

  <div class="bd entry-content">
    <%= @post.body_rendered %>
  </div>

  <div class="ft">
    <% unless @post.tags.empty? %>
      <div class="tags">
        <span class="icon tag"></span>
        <ul>
          <% @post.tags.each do |tag| %>
            <li><a href="<%== tag.url %>" rel="tag"><%== tag.name %></a></li>
          <% end %>
        </ul>
      </div>
    <% end %>

    <% if @post.allow_comments && Thoth::Config.site['enable_comments'] %>
      <div class="meta robots-nocontent">
        <span class="icon comment-post"></span>
        <a href="<%== @post.url %>#post-comment">Post a comment</a>
      </div>
    <% end %>
  </div>
</div>

<% if Thoth::Config.site['enable_comments'] && (@post.allow_comments || @post.comments.count > 0) %>
  <%= Thoth::PostController.render_view(:comments, :comments => @comments) %>
<% end %>
